const { buildModule } = require("@nomicfoundation/hardhat-ignition/modules");
const { ACLManagerModule } = require("./ACLManager");
const { TestTokensModule, FakeDexModule, FakeLendingModule } = require("./Fakes");

const DNPWithFakesModule = buildModule("DeltaNeutralPortfolioWithFakes", m => {
  const { ACLManager } = m.useModule(ACLManagerModule);
  const { tokenA, tokenB } = m.useModule(TestTokensModule);
  const { fakeDex } = m.useModule(FakeDexModule);
  const { fakeLending } = m.useModule(FakeLendingModule);

  const DNP = m.contract("DeltaNeutralPortfolio", [ACLManager, [tokenA, tokenB], [fakeDex], [fakeLending]]);

  return { DNP };
});

module.exports = { DNPWithFakesModule };
